How can I remove 2 from SHELF-2-1-1-2-1 and join the remaining parts in JavaScript